package com.base.extendsdemo;

class Person{
	private int age;
	/**
	 * @return age
	 */
	public int getAge() {
		return age;
	}
	/**
	 * @param age 要设置的 age
	 */
	public void setAge(int age) {
		this.age = age;
	}
	
	/**
	 * @return name
	 */
	public String getName() {
		return name;
	}
	/**
	 * @param name 要设置的 name
	 */
	public void setName(String name) {
		this.name = name;
	}
	private String name;
	
	public void tell(){
		System.out.println("姓名:"+getName()+"年龄:"+ getAge());
	}
}

class Student extends Person{
	private int score;

	public int getScore() {
		return score;
	}

	public void setScore(int score) {
		this.score = score;
	}
	
	public void say(){
		System.out.println("成绩:"+getScore());
	}
}

public class ExtendDemo01 {
	public static void main(String[] args) {
		Student s = new Student();
		s.setAge(20);
		s.setName("zhangsan");
		s.setScore(100);
		
	}
}